from django.conf.urls.defaults import *
from piston.resource import Resource
from piston.authentication import HttpBasicAuthentication

from idit.api.handlers import HomeTimeLineHandler, DitHandler,CategoryHandler,URLHandler

home_timeline = Resource(handler=HomeTimeLineHandler )
dit = Resource(handler=DitHandler)
category = Resource(handler=CategoryHandler)
urlhandler = Resource(handler=URLHandler)

urlpatterns = patterns('',
    url(r'^dit/home_timeline/$', home_timeline), 
    url(r'^dit/(?P<id>\d+)/$', dit), 
    url(r'^dit/$', dit), 
    url(r'^dit/category/$', category), 
    url(r'^url/$',urlhandler),
)